#ifndef _CORE_
#define _CORE_

#include "base.h"

#include "NetIO.h"
#include "..\Scene\SceneManager.h"

#include "hge\hge.h"
#include "hge\hgeresource.h"
#include "hge\hgegui.h"

namespace air {
	
	class IObject;
	class IGuiObject;
	class IScene;
	class Acc;
	/**
	* @brief Graphic Component
	*/
	class Core {
	public:
		
		static Core* create();
		static void release();

		bool initiate();
		void start();
		bool addScene(IScene*);
		NetIO* getNetIO() { return &netIO; }

	private:
		Core();
		~Core();
		bool loadResource();
		static bool frameFunc();
		static bool renderFunc();
		/**
		 * @brief function in another thread for receiving and sending packages
		 */
		static bool nodeFunc(int interval) {}
		/**
		 * @brief pointer to Core singleton. guaranteed to be NULL when unavailable
		 */
		static Core* instance;
		/**
		 * @brief Network Component
		 */
		NetIO netIO;
		/**
		 * @brief Scene Manager
		 */
		SceneManager scenes; 
		HGE* hge;
		hgeResourceManager hgeResMan;
	};
}


#endif
